/*
 Navicat Premium Data Transfer

 Source Server         : shop
 Source Server Type    : MySQL
 Source Server Version : 50718
 Source Host           : localhost
 Source Database       : shop

 Target Server Type    : MySQL
 Target Server Version : 50718
 File Encoding         : utf-8

 Date: 04/01/2019 20:37:26 PM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `Authority`
-- ----------------------------
DROP TABLE IF EXISTS `Authority`;
CREATE TABLE `Authority` (
  `authority_id` bigint(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(11) DEFAULT NULL,
  `authority_code` varchar(500) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `expire_time` datetime DEFAULT NULL,
  PRIMARY KEY (`authority_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `Collection`
-- ----------------------------
DROP TABLE IF EXISTS `Collection`;
CREATE TABLE `Collection` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `Collection`
-- ----------------------------
BEGIN;
INSERT INTO `Collection` VALUES ('1', '15', '1'), ('7', '15', '121');
COMMIT;

-- ----------------------------
--  Table structure for `Comment`
-- ----------------------------
DROP TABLE IF EXISTS `Comment`;
CREATE TABLE `Comment` (
  `comment_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(11) DEFAULT NULL,
  `comment` varchar(500) DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `product_id` bigint(11) DEFAULT NULL,
  PRIMARY KEY (`comment_id`),
  KEY `user_id` (`user_id`),
  KEY `user_id_index` (`user_id`),
  KEY `comment_user_id_index` (`user_id`) USING BTREE,
  KEY `parent_id` (`parent_id`),
  KEY `product_id` (`product_id`),
  KEY `product_id_2` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `Comment`
-- ----------------------------
BEGIN;
INSERT INTO `Comment` VALUES ('1', '11', 'nihao', null, '1', '4'), ('2', '9', 'hello ', '1', '0', '4'), ('3', '11', 'hello', '1', '0', '4'), ('4', '11', 'hello', null, '0', '4'), ('5', '9', 'aaaaa', null, '0', '4'), ('6', '9', 'helleeee', '5', '0', '4'), ('7', '9', null, null, '0', null), ('8', '9', null, null, '0', null), ('9', '10', 'hello', null, '0', '3'), ('10', '10', '该评论已被删除', null, '0', '2'), ('11', '10', 'lalal', '10', '0', '2'), ('12', '10', 'nimenhao', null, '1', '2'), ('13', '11', 'hello', null, '0', '120'), ('14', '12', 'hello', null, '0', '16');
COMMIT;

-- ----------------------------
--  Table structure for `Discount`
-- ----------------------------
DROP TABLE IF EXISTS `Discount`;
CREATE TABLE `Discount` (
  `discount_id` bigint(11) NOT NULL AUTO_INCREMENT,
  `discount` double(11,2) NOT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `type` int(2) DEFAULT NULL,
  PRIMARY KEY (`discount_id`)
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `Discount`
-- ----------------------------
BEGIN;
INSERT INTO `Discount` VALUES ('1', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('2', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('3', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('4', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('5', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('6', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('7', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('8', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('9', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('10', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('11', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('12', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('13', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('14', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('15', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('16', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('17', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('18', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('19', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('20', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('21', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('22', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('23', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('24', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('25', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('26', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('27', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('28', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('29', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('30', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('31', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('32', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('33', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('34', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('35', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('36', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('37', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('38', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('39', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('40', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('41', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('42', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('43', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('44', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('45', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('46', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('47', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('48', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('49', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('50', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('51', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('52', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('53', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('54', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('55', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('56', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('57', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('58', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('59', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('60', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('61', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('62', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null), ('63', '0.80', '2018-11-11 00:00:00', '2019-12-12 23:59:59', null);
COMMIT;

-- ----------------------------
--  Table structure for `EmailQueue`
-- ----------------------------
DROP TABLE IF EXISTS `EmailQueue`;
CREATE TABLE `EmailQueue` (
  `email_queue_id` bigint(11) NOT NULL AUTO_INCREMENT,
  `send_addr` varchar(500) DEFAULT NULL,
  `to_addr` varchar(500) NOT NULL,
  `content` text NOT NULL,
  `create_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `state` tinyint(2) NOT NULL DEFAULT '1',
  `subject` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`email_queue_id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `EmailQueue`
-- ----------------------------
BEGIN;
INSERT INTO `EmailQueue` VALUES ('1', '1', '1', '1', '2019-01-01 12:27:57', '0', ''), ('2', '2', 'm13814545863@163.com', '<a herf=\"https://www.baidu.com\">sad</a>', '2019-01-01 12:20:03', '0', '23123'), ('3', null, '1933931831@qq.com', '<a href=\"http://localhost:8080/reset/password?token=dcc2d8dbb099fdc160b15a03d006d274\">????????????????????<br/>http://localhost:8080/reset/password?token=dcc2d8dbb099fdc160b15a03d006d274</a>', '2019-01-01 15:14:03', '0', '????'), ('4', null, '1933931831@qq.com', '<a href=\"http://localhost:8080/reset/password?token=6bb1796b20da04702449ed9e34e70a15\">????????????????????<br/>http://localhost:8080/reset/password?token=6bb1796b20da04702449ed9e34e70a15</a>', '2019-01-01 15:15:33', '0', '????'), ('5', null, '1933931831@qq.com', '<a href=\"http://localhost:8080/reset/password?token=7059564033a099bfa92f6a722376d8c5\">????????????????????<br/>http://localhost:8080/reset/password?token=7059564033a099bfa92f6a722376d8c5</a>', '2019-01-01 15:16:30', '0', '????'), ('6', null, '1933931831@qq.com', '<a href=\"http://localhost:8080/reset/password?token=3f79d9490eeba6da5b07f360c3b93966\">Please copy the url to browser to reset your password<br/>http://localhost:8080/reset/password?token=3f79d9490eeba6da5b07f360c3b93966</a>', '2019-01-01 15:19:03', '0', 'Change Password'), ('7', null, 'm13814545863@163.com', '<a href=\"http://localhost:8080/reset/password?token=c1472e9873abba615a67087527d0d5cc\">Please copy the url to browser to reset your password<br/>http://localhost:8080/reset/password?token=c1472e9873abba615a67087527d0d5cc</a>', '2019-01-01 15:19:30', '0', 'Change Password'), ('8', null, 'm13814545863@163.com', '<a href=\"http://localhost:8080/reset/password?token=5e89940c9b021498d82d979015b737af\">Please copy the url to browser to reset your password<br/>http://localhost:8080/reset/password?token=5e89940c9b021498d82d979015b737af</a>', '2019-01-01 15:21:33', '0', 'Change Password'), ('9', null, 'm13814545863@163.com', '<a href=\"http://localhost:8080/reset/password?token=98219bdbe1ad99a436ab801144f93a5e\">Please copy the url to browser to reset your password<br/>http://localhost:8080/reset/password?token=98219bdbe1ad99a436ab801144f93a5e</a>', '2019-01-01 15:25:33', '0', 'Change Password'), ('14', null, 'm13814545863@163.com', '<a href=\"http://localhost:8080/reset/password?token=005d80ef7cfee138148b7143513b606a\">Please copy the url to browser to reset your password<br/>http://localhost:8080/reset/password?token=005d80ef7cfee138148b7143513b606a</a>', '2019-01-01 15:38:03', '0', 'Change Password'), ('15', null, 'm13814545863@163.com', '<a href=\"http://localhost:8080/reset/password?token=52169f7494c11f0af4c3a52948c55376\">Please copy the url to browser to reset your password<br/>http://localhost:8080/reset/password?token=52169f7494c11f0af4c3a52948c55376</a>', '2019-01-01 15:50:33', '0', 'Change Password'), ('16', null, 'm13814545863@163.com', '<a href=\"http://localhost:8080/reset/password?token=91219979709c9bf9c44d18fafac0cbc4\">Please copy the url to browser to reset your password<br/>http://localhost:8080/reset/password?token=91219979709c9bf9c44d18fafac0cbc4</a>', '2019-01-16 21:50:33', '0', 'Change Password'), ('17', null, 'm13814545863@163.com', '<a href=\"http://localhost:8080/reset/password?token=1592b0560a4b714e3bd821e66a8ea482\">Please copy the url to browser to reset your password<br/>http://localhost:8080/reset/password?token=1592b0560a4b714e3bd821e66a8ea482</a>', '2019-02-18 21:57:03', '0', 'Change Password'), ('18', null, 'm13814545863@163.com', '<a href=\"http://localhost:8080/reset/password?token=ff7f593b8cdb40851e9cc02dc214b8f9\">Please copy the url to browser to reset your password<br/>http://localhost:8080/reset/password?token=ff7f593b8cdb40851e9cc02dc214b8f9</a>', '2019-03-16 18:59:34', '0', 'Change Password'), ('19', null, '1212@12.12', '<a href=\"http://localhost:8080/reset/password?token=c17e12334d26ad6b857900846a28bc94\">Please copy the url to browser to reset your password<br/>http://localhost:8080/reset/password?token=c17e12334d26ad6b857900846a28bc94</a>', '2019-03-17 21:18:33', '0', 'Change Password'), ('21', null, '1212@1212.1212', '<a href=\"http://localhost:8080/reset/password?token=506aefdc81bca98fc325bf205b323a7b\">Please copy the url to browser to reset your password<br/>http://localhost:8080/reset/password?token=506aefdc81bca98fc325bf205b323a7b</a>', '2019-03-18 20:55:00', '0', 'Change Password'), ('22', null, '1212@1212.12121212', '<a href=\"http://localhost:8080/reset/password?token=81b4e89bc271de44eb676a9b81bc4abc\">Please copy the url to browser to reset your password<br/>http://localhost:8080/reset/password?token=81b4e89bc271de44eb676a9b81bc4abc</a>', '2019-03-18 20:55:00', '0', 'Change Password');
COMMIT;

-- ----------------------------
--  Table structure for `FunctionRule`
-- ----------------------------
DROP TABLE IF EXISTS `FunctionRule`;
CREATE TABLE `FunctionRule` (
  `function_rule_id` bigint(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(11) DEFAULT NULL,
  `function_code` varchar(500) DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  PRIMARY KEY (`function_rule_id`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `fk_function_rule_user` FOREIGN KEY (`user_id`) REFERENCES `User` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Table structure for `Fuzhi`
-- ----------------------------
DROP TABLE IF EXISTS `Fuzhi`;
CREATE TABLE `Fuzhi` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `Fuzhi`
-- ----------------------------
BEGIN;
INSERT INTO `Fuzhi` VALUES ('1', '油性皮肤'), ('2', '干性皮肤'), ('3', '混合型皮肤'), ('4', '中性皮肤'), ('5', '敏感性皮肤');
COMMIT;

-- ----------------------------
--  Table structure for `Order`
-- ----------------------------
DROP TABLE IF EXISTS `Order`;
CREATE TABLE `Order` (
  `order_id` bigint(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(11) NOT NULL,
  `total_price` double(11,2) DEFAULT NULL,
  `pay_status` tinyint(2) DEFAULT NULL,
  `pay_time` datetime DEFAULT NULL,
  `order_number` varchar(500) DEFAULT NULL,
  `expire_time` datetime DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`order_id`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `fk_order_user_id` FOREIGN KEY (`user_id`) REFERENCES `User` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `Order`
-- ----------------------------
BEGIN;
INSERT INTO `Order` VALUES ('19', '9', '2786.00', '1', '2019-01-13 17:40:18', '201901135681138', '1970-01-04 08:00:00', '2019-01-13 17:40:18'), ('20', '9', '420.45', '1', '2019-01-13 22:36:18', '201901139320826', '1970-01-04 08:00:00', '2019-01-13 22:36:18'), ('21', '9', '838.50', '1', '2019-01-15 22:33:27', '201901154047613', '1970-01-04 08:00:00', '2019-01-15 22:33:27'), ('25', '9', '503.10', '1', '2019-01-15 22:36:26', '201901153821652', '1970-01-04 08:00:00', '2019-01-15 22:36:26'), ('26', '9', '0.00', '1', '2019-01-16 22:45:55', '201901163326227', '1970-01-04 08:00:00', '2019-01-16 22:45:55'), ('27', '9', '336.60', '1', '2019-01-17 21:43:38', '201901172853970', '1970-01-04 08:00:00', '2019-01-17 21:43:38'), ('28', '9', '83850.00', '1', '2019-03-02 20:51:57', '201903020093370', '1970-01-04 08:00:00', '2019-03-02 20:51:57'), ('29', '9', '83850.00', '1', '2019-03-02 20:56:51', '201903029273156', '1970-01-04 08:00:00', '2019-03-02 20:56:51'), ('30', '9', '83850.00', '1', '2019-03-02 21:16:53', '201903022217569', '1970-01-04 08:00:00', '2019-03-02 21:16:53'), ('31', '9', '100.50', '1', '2019-03-12 21:45:28', '201903128819162', '1970-01-04 08:00:00', '2019-03-12 21:45:28'), ('32', '11', '100.50', '1', '2019-03-16 20:32:12', '201903161915912', '1970-01-04 08:00:00', '2019-03-16 20:32:12'), ('33', '10', '100.50', '1', '2019-03-17 18:16:15', '201903170895437', '1970-01-04 08:00:00', '2019-03-17 18:16:15'), ('34', '10', '90.00', '1', '2019-03-17 18:53:25', '201903175134670', '1970-01-04 08:00:00', '2019-03-17 18:53:25'), ('35', '12', '135.00', '1', '2019-03-20 15:31:32', '201903203867734', '1970-01-04 08:00:00', '2019-03-20 15:31:32');
COMMIT;

-- ----------------------------
--  Table structure for `OrderItem`
-- ----------------------------
DROP TABLE IF EXISTS `OrderItem`;
CREATE TABLE `OrderItem` (
  `order_item_id` bigint(11) NOT NULL AUTO_INCREMENT,
  `order_id` bigint(11) DEFAULT NULL,
  `shop_car_id` bigint(11) DEFAULT NULL,
  `pay_time` datetime DEFAULT NULL,
  `pay_status` tinyint(2) DEFAULT NULL,
  `price` double(11,2) DEFAULT NULL,
  PRIMARY KEY (`order_item_id`),
  KEY `order_id` (`order_id`),
  KEY `shop_car_id` (`shop_car_id`),
  CONSTRAINT `fk_order_item_order_id` FOREIGN KEY (`order_id`) REFERENCES `Order` (`order_id`),
  CONSTRAINT `fk_order_item_shop_car_id` FOREIGN KEY (`shop_car_id`) REFERENCES `ShopCar` (`shop_car_id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `OrderItem`
-- ----------------------------
BEGIN;
INSERT INTO `OrderItem` VALUES ('6', '19', '1', '2019-01-13 17:40:18', '3', '597.00'), ('7', '19', '3', '2019-01-13 17:40:18', '3', '2189.00'), ('8', '20', '4', '2019-01-13 22:36:18', '1', '83.85'), ('9', '20', '5', '2019-01-13 22:36:18', '1', '336.60'), ('10', '21', '6', '2019-01-15 22:33:27', '1', '838.50'), ('14', '25', '7', '2019-01-15 22:36:26', '1', '503.10'), ('15', '27', '12', '2019-01-17 21:43:38', '1', '336.60'), ('16', '28', '13', '2019-03-02 20:51:57', '1', '83850.00'), ('17', '29', '14', '2019-03-02 20:56:51', '1', '83850.00'), ('18', '30', '15', '2019-03-02 21:16:53', '1', '83850.00'), ('19', '31', '17', '2019-03-12 21:45:28', '1', '100.50'), ('20', '32', '18', '2019-03-16 20:32:12', '4', '100.50'), ('21', '33', '19', '2019-03-17 18:16:15', '1', '100.50'), ('22', '34', '21', '2019-03-17 18:53:25', '4', '90.00'), ('23', '35', '22', '2019-03-20 15:31:32', '4', '135.00');
COMMIT;

-- ----------------------------
--  Table structure for `Product`
-- ----------------------------
DROP TABLE IF EXISTS `Product`;
CREATE TABLE `Product` (
  `product_id` bigint(11) NOT NULL AUTO_INCREMENT,
  `product_name` varchar(500) NOT NULL,
  `product_brief` text,
  `product_pic` text NOT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `sort` int(3) DEFAULT NULL,
  `limit_count` int(11) NOT NULL,
  `max_count` int(11) NOT NULL,
  `price` double(11,2) DEFAULT NULL,
  `product_type_id` bigint(11) NOT NULL,
  `discount_id` bigint(11) DEFAULT NULL,
  `user_id` bigint(11) DEFAULT NULL,
  `sold_count` int(11) DEFAULT '0',
  `state` tinyint(2) DEFAULT '1' COMMENT '0',
  `recommend_id` bigint(11) DEFAULT NULL,
  `show_pic` text,
  PRIMARY KEY (`product_id`),
  KEY `product_id` (`product_id`) USING BTREE,
  KEY `product_type_id` (`product_type_id`),
  KEY `discount_id` (`discount_id`),
  KEY `fk_product_user_id` (`user_id`),
  CONSTRAINT `fk_product_discount_id` FOREIGN KEY (`discount_id`) REFERENCES `Discount` (`discount_id`),
  CONSTRAINT `product_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `User` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=131 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `Product`
-- ----------------------------
BEGIN;
INSERT INTO `Product` VALUES ('1', '安德玛', '安德玛 男子 Armour UA 运动短袖紧身衣', 'https://img.alicdn.com/imgextra/i4/1940724523/O1CN01liDWGD1jHZuWQTJvQ_!!0-item_pic.jpg_430x430q90.jpg', '2019-01-06 20:25:48', '2019-01-06 20:25:51', '0', '0', '1000', '100.00', '9', '30', '11', '0', '0', '1', 'https://img.alicdn.com/imgextra/i4/1940724523/TB2LZKcsmhlpuFjSspkXXa1ApXa_!!1940724523.jpg'), ('2', 'PS4全新', '创想电玩 PS4主机全新 PS4家用游戏机 国行 港版slim500G/1TB/PRO', 'https://img.alicdn.com/imgextra/i3/91913214/O1CN01SxId8b1Zc3SyVSANn_!!91913214.jpg_400x400.jpg', '2019-01-06 20:28:40', '2019-01-06 20:28:42', '0', '0', '1000', '100.00', '36', '31', '11', '1', '1', '2', 'https://img.alicdn.com/imgextra/i1/91913214/O1CN01Ep4Ikz1Zc3Rw6Fnj9_!!91913214.jpg'), ('3', 'PS4 Slim', '索尼PS4主机 ps4 家用游戏机 pro slim主机500G/1TB/2TB顺丰包邮', 'https://gd2.alicdn.com/imgextra/i4/387562626/O1CN01EAgalR1VGkZfpUv6c_!!387562626.jpg_400x400.jpg', '2019-01-06 20:29:24', '2019-01-06 20:29:26', '0', '0', '1000', '100.00', '36', '32', '11', '0', '1', '3', 'https://img.alicdn.com/imgextra/i2/387562626/O1CN01h3aPZI1VGkYubOLGt_!!387562626.jpg'), ('4', '国行PS', 'Sony/索尼 PS4 Pro slim主机 国行ps4体感游戏机家用电视游戏机', 'https://img.alicdn.com/imgextra/i1/2743454846/O1CN01jxpCw21lfVqDyDyF9_!!0-item_pic.jpg_430x430q90.jpg', '2019-01-06 20:31:15', '2019-01-06 20:31:17', '0', '0', '1000', '150.00', '36', '33', '11', '3010', '1', '4', 'https://img.alicdn.com/imgextra/i2/2743454846/O1CN010IJ9s71lfVqP65hgE_!!2743454846.jpg'), ('5', 'Play Station', '索尼PS4主机 ps4pro国行港版slim500G/1TB/2TB 大镖客 鬼泣 只狼', 'https://gd2.alicdn.com/imgextra/i2/125197181/O1CN01aeTLYR22uweazY0AG_!!125197181.jpg_400x400.jpg', '2019-01-06 20:25:48', '2019-01-06 20:25:51', '0', '0', '1000', '199.00', '36', '34', '11', '0', '0', '5', 'https://img.alicdn.com/imgextra/i1/125197181/O1CN01z2Dzih22uwdtupEhR_!!125197181.jpg'), ('8', '任天堂', '任天堂switch游戏机NS主机体感电视家用机掌机 塞尔达 精灵宝可梦', 'https://img.alicdn.com/imgextra/i1/382870095/O1CN01j0vAmR1CZY8EeeDuj_!!382870095.jpg_400x400.jpg', '2019-01-06 20:25:48', '2019-01-06 20:25:51', '0', '0', '1000', '298.00', '11', '37', '11', '0', '1', '8', 'https://img.alicdn.com/imgextra/i4/382870095/TB2DmVpeWAoBKNjSZSyXXaHAVXa_!!382870095.jpg'), ('9', 'Switch', '任天堂NS switch ns主机 宝可梦口袋妖怪限定皮卡丘日版/港版包邮', 'https://img.alicdn.com/imgextra/i2/161533600/TB29Z6Yo77mBKNjSZFyXXbydFXa_!!161533600.jpg_400x400.jpg', '2019-01-06 20:25:48', '2019-01-06 20:25:51', '0', '0', '1000', '199.00', '11', '38', '11', '0', '1', '9', 'https://img.alicdn.com/imgextra/i3/161533600/TB2ObIptbBmpuFjSZFAXXaQ0pXa_!!161533600.jpg'), ('24', '三国志13', '三国志13 STEAM PC正版 三国志 XIII 中文版 威力加强版 全球', 'https://img.alicdn.com/imgextra/i2/TB1DE0nQpXXXXbdXpXXXXXXXXXX_!!0-item_pic.jpg_430x430q90.jpg', '2019-01-06 20:25:48', '2019-01-06 20:25:51', '0', '0', '1000', '199.00', '10', '12', '11', '0', '1', '24', 'https://img.alicdn.com/imgextra/i2/2944531825/TB2Mf28jbXlpuFjSszfXXcSGXXa_!!2944531825.jpg'), ('25', '威力加强版', '三国志13威力加强版PK 新1.13版73DLC 中文版 12+11+10+9+1~8合集', 'https://img.alicdn.com/imgextra/i3/3983801670/O1CN01zhenfx1OCtvXHkeKE_!!0-item_pic.jpg_430x430q90.jpg', '2019-01-06 20:25:48', '2019-01-06 20:25:51', '0', '0', '1000', '199.00', '10', '13', '11', '0', '1', '25', 'https://img.alicdn.com/imgextra/i3/3983801670/O1CN011OCttEzhgDZ2Dhm_!!3983801670.jpg'), ('30', 'GTA5', 'Grand Theft Auto GTA V 5 Vinyl Decal PS4 Skin Stickers for P', 'https://gd2.alicdn.com/imgextra/i1/332630765/O1CN011HWPSY8PLCOSAIN_!!332630765.jpg_400x400.jpg', '2019-01-06 20:25:48', '2019-01-06 20:25:51', '0', '0', '1000', '199.00', '13', '18', '11', '0', '1', '30', 'https://img.alicdn.com/imgextra/i7/2200578438939/TB1cglMy7voK1RjSZFNL6UxMVXa?0-item_pic.jpg'), ('31', '贴纸', 'PS4 PRO贴纸GTA5手柄机身贴膜PS4PRO痛贴', 'https://gd2.alicdn.com/imgextra/i1/332630765/O1CN011HWPSY8PLCOSAIN_!!332630765.jpg_400x400.jpg', '2019-01-06 20:25:48', '2019-01-06 20:25:51', '0', '0', '1000', '199.00', '13', '19', '11', '0', '1', '31', 'https://img.alicdn.com/imgextra/i7/2200578438939/TB1cglMy7voK1RjSZFNL6UxMVXa?0-item_pic.jpg'), ('36', '斗士Z', '龙珠斗士Z 中文版龙珠格斗z 单机游戏 扎马斯合体孙悟空贝吉塔SGS', 'https://img.alicdn.com/imgextra/i4/3983801670/TB23bbkuTCWBKNjSZFtXXaC3FXa_!!3983801670-0-item_pic.jpg_430x430q90.jpg', '2019-01-06 20:25:48', '2019-01-06 20:25:51', '0', '0', '1000', '199.00', '14', '24', '11', '0', '1', '36', 'https://img.alicdn.com/imgextra/i2/3983801670/O1CN011OCtsso4dAUSvzY_!!3983801670.png'), ('37', '圣斗士星矢', '圣斗士星矢斗士之魂 中文版全人物 赠修改器pc格斗游戏', 'https://img.alicdn.com/imgextra/i4/4021182293/O1CN01tggO2K1SoEftKf5Xk_!!0-item_pic.jpg_430x430q90.jpg', '2019-01-06 20:25:48', '2019-01-06 20:25:51', '0', '0', '1000', '199.00', '14', '25', '11', '0', '1', '37', 'https://img.alicdn.com/imgextra/i4/4021182293/O1CN01TW2jXY1SoEfvHtD67_!!4021182293.gif'), ('40', 'iPhone', 'Apple/苹果 iPhone XR 移动联通电信4G手机双卡双待 苹果iPhoneXR', 'https://img.alicdn.com/imgextra/i4/2616970884/O1CN013rUlpr1IOudAJkJFX_!!2616970884.jpg_430x430q90.jpg', '2019-01-06 20:25:48', '2019-01-06 20:25:51', '0', '0', '1000', '199.00', '15', '28', '11', '0', '1', '40', 'https://img.alicdn.com/imgextra/i2/2616970884/O1CN011IOuaaW4NSlfxXz_!!2616970884.jpg'), ('120', 'iPhone8', 'Apple/苹果 iPhone 8 64G 移动联通电信全网通4G手机 官方正品苹果iPhone8', 'https://img.alicdn.com/imgextra/i3/2616970884/O1CN01ZFcpqW1IOucCwr1KI_!!2616970884.jpg_430x430q90.jpg', '2019-03-17 18:52:51', '2019-03-17 18:52:51', '0', '0', '100', '100.00', '15', '29', '11', '1', '1', '41', 'https://img.alicdn.com/imgextra/i1/2616970884/TB2giEVgU3IL1JjSZFMXXajrFXa-2616970884.jpg'), ('121', '安德玛健身', 'Under Armour 安德玛 UA男子 The Storm 跑步运动外套 -1318013', 'https://img.alicdn.com/imgextra/i3/3237960459/O1CN01YGVdek1FGGIIOzxf9_!!0-item_pic.jpg_430x430q90.jpg', '2019-03-31 21:23:10', '2019-03-31 21:23:10', '0', '0', '111', '111.00', '9', '63', '11', '0', '1', '47', 'https://img.alicdn.com/imgextra/i3/3237960459/O1CN011FGGG0vTtdpgM9Q_!!3237960459.jpg'), ('122', '三国志13', '三国志13 STEAM PC正版 三国志 XIII 中文版 威力加强版 全球', 'https://img.alicdn.com/imgextra/i2/TB1DE0nQpXXXXbdXpXXXXXXXXXX_!!0-item_pic.jpg_430x430q90.jpg', '2019-01-06 20:25:48', '2019-01-06 20:25:51', '0', '0', '1000', '199.00', '36', '12', '11', '0', '1', '24', 'https://img.alicdn.com/imgextra/i2/2944531825/TB2Mf28jbXlpuFjSszfXXcSGXXa_!!2944531825.jpg'), ('125', '国行PS', 'Sony/索尼 PS4 Pro slim主机 国行ps4体感游戏机家用电视游戏机', 'https://img.alicdn.com/imgextra/i1/2743454846/O1CN01jxpCw21lfVqDyDyF9_!!0-item_pic.jpg_430x430q90.jpg', '2019-01-06 20:31:15', '2019-01-06 20:31:17', '0', '0', '1000', '150.00', '36', '33', '11', '3010', '1', '4', 'https://img.alicdn.com/imgextra/i2/2743454846/O1CN010IJ9s71lfVqP65hgE_!!2743454846.jpg'), ('126', 'Play Station', '索尼PS4主机 ps4pro国行港版slim500G/1TB/2TB 大镖客 鬼泣 只狼', 'https://gd2.alicdn.com/imgextra/i2/125197181/O1CN01aeTLYR22uweazY0AG_!!125197181.jpg_400x400.jpg', '2019-01-06 20:25:48', '2019-01-06 20:25:51', '0', '0', '1000', '199.00', '36', '34', '11', '0', '0', '5', 'https://img.alicdn.com/imgextra/i1/125197181/O1CN01z2Dzih22uwdtupEhR_!!125197181.jpg'), ('127', 'PS4全新', '创想电玩 PS4主机全新 PS4家用游戏机 国行 港版slim500G/1TB/PRO', 'https://img.alicdn.com/imgextra/i3/91913214/O1CN01SxId8b1Zc3SyVSANn_!!91913214.jpg_400x400.jpg', '2019-01-06 20:28:40', '2019-01-06 20:28:42', '0', '0', '1000', '100.00', '36', '31', '11', '1', '1', '2', 'https://img.alicdn.com/imgextra/i1/91913214/O1CN01Ep4Ikz1Zc3Rw6Fnj9_!!91913214.jpg'), ('128', 'PS4 Slim', '索尼PS4主机 ps4 家用游戏机 pro slim主机500G/1TB/2TB顺丰包邮', 'https://gd2.alicdn.com/imgextra/i4/387562626/O1CN01EAgalR1VGkZfpUv6c_!!387562626.jpg_400x400.jpg', '2019-01-06 20:29:24', '2019-01-06 20:29:26', '0', '0', '1000', '100.00', '36', '32', '11', '0', '1', '3', 'https://img.alicdn.com/imgextra/i2/387562626/O1CN01h3aPZI1VGkYubOLGt_!!387562626.jpg'), ('129', '国行PS', 'Sony/索尼 PS4 Pro slim主机 国行ps4体感游戏机家用电视游戏机', 'https://img.alicdn.com/imgextra/i1/2743454846/O1CN01jxpCw21lfVqDyDyF9_!!0-item_pic.jpg_430x430q90.jpg', '2019-01-06 20:31:15', '2019-01-06 20:31:17', '0', '0', '1000', '150.00', '36', '33', '11', '3010', '1', '4', 'https://img.alicdn.com/imgextra/i2/2743454846/O1CN010IJ9s71lfVqP65hgE_!!2743454846.jpg'), ('130', 'Play Station', '索尼PS4主机 ps4pro国行港版slim500G/1TB/2TB 大镖客 鬼泣 只狼', 'https://gd2.alicdn.com/imgextra/i2/125197181/O1CN01aeTLYR22uweazY0AG_!!125197181.jpg_400x400.jpg', '2019-01-06 20:25:48', '2019-01-06 20:25:51', '0', '0', '1000', '199.00', '36', '34', '11', '0', '0', '5', 'https://img.alicdn.com/imgextra/i1/125197181/O1CN01z2Dzih22uwdtupEhR_!!125197181.jpg');
COMMIT;

-- ----------------------------
--  Table structure for `ProductType`
-- ----------------------------
DROP TABLE IF EXISTS `ProductType`;
CREATE TABLE `ProductType` (
  `type_id` bigint(11) NOT NULL AUTO_INCREMENT,
  `type_name` varchar(500) NOT NULL,
  `type_brief` text,
  `parent_id` bigint(11) DEFAULT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`type_id`),
  KEY `parent_id` (`parent_id`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `ProductType`
-- ----------------------------
BEGIN;
INSERT INTO `ProductType` VALUES ('1', '运动', null, null, '0'), ('2', '游戏', null, null, '1'), ('3', '手机', null, null, '2'), ('4', '电脑', null, null, '3'), ('5', '零食', null, null, '4'), ('6', '生鲜', null, null, '5'), ('9', '健身服', null, '1', '0'), ('10', '三国志', null, '2', '0'), ('11', 'SWITCH', null, '2', '0'), ('12', '使命召唤', null, '2', '0'), ('13', 'GTA', null, '2', '0'), ('14', '格斗', null, '2', '0'), ('15', 'iPhone', null, '3', '0'), ('16', '苹果', null, '4', '0'), ('17', '戴尔', null, '4', '0'), ('18', '三星', null, '4', '0'), ('19', '饼干', null, '5', '0'), ('20', '卫龙', null, '5', '0'), ('21', '糖果', null, '5', '0'), ('22', '鲜肉', null, '6', '0'), ('23', '冷冻海鲜', null, '6', '0'), ('24', '新鲜水果', null, '6', '0'), ('25', '办公', null, null, '9'), ('26', '家纺', null, null, '10'), ('27', '签字笔', null, '25', '0'), ('29', '笔记本', null, '25', '0'), ('30', '被子', null, '26', '0'), ('32', '跑步机', null, '1', '0'), ('33', '健腹轮', null, '1', '0'), ('36', 'PS4', null, '2', '0');
COMMIT;

-- ----------------------------
--  Table structure for `Recommend`
-- ----------------------------
DROP TABLE IF EXISTS `Recommend`;
CREATE TABLE `Recommend` (
  `recommend_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `gender` varchar(20) DEFAULT NULL,
  `min_age` int(11) DEFAULT NULL,
  `max_age` int(20) DEFAULT NULL,
  `fuzhi` int(11) DEFAULT NULL,
  PRIMARY KEY (`recommend_id`)
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `Recommend`
-- ----------------------------
BEGIN;
INSERT INTO `Recommend` VALUES ('1', 'M', '10', '50', '2'), ('2', 'M', '20', '30', '1'), ('3', 'M', '20', '30', '1'), ('4', 'M', '20', '30', '1'), ('5', 'M', '20', '30', '1'), ('6', 'M', '20', '30', '1'), ('7', 'M', '20', '30', '1'), ('8', 'M', '20', '30', '1'), ('9', 'M', '20', '30', '1'), ('10', 'M', '20', '30', '1'), ('11', 'M', '20', '30', '1'), ('12', 'M', '20', '30', '1'), ('13', 'M', '20', '30', '1'), ('14', 'M', '20', '30', '1'), ('15', 'M', '20', '30', '1'), ('16', 'M', '20', '30', '1'), ('17', 'M', '20', '30', '1'), ('18', 'M', '20', '30', '1'), ('19', 'M', '20', '30', '1'), ('20', 'M', '20', '30', '1'), ('21', 'M', '20', '30', '1'), ('22', 'M', '20', '30', '1'), ('23', 'M', '20', '30', '1'), ('24', 'M', '20', '30', '1'), ('25', 'M', '20', '30', '1'), ('26', 'M', '20', '30', '1'), ('27', 'M', '20', '30', '1'), ('28', 'M', '20', '30', '1'), ('29', 'M', '20', '30', '1'), ('30', 'M', '20', '30', '1'), ('31', 'M', '20', '30', '1'), ('32', 'M', '20', '30', '1'), ('33', 'M', '20', '30', '1'), ('34', 'M', '20', '30', '1'), ('35', 'M', '20', '30', '1'), ('36', 'M', '20', '30', '1'), ('37', 'M', '20', '30', '1'), ('38', 'M', '20', '30', '1'), ('39', 'M', '20', '30', '1'), ('40', 'M', '20', '30', '1'), ('41', 'M', '20', '30', '1'), ('42', 'M', '20', '30', '1'), ('43', 'M', '20', '30', '1'), ('44', 'M', '20', '30', '1'), ('45', 'M', '20', '30', '1'), ('46', null, null, null, null), ('47', null, null, null, null);
COMMIT;

-- ----------------------------
--  Table structure for `Report`
-- ----------------------------
DROP TABLE IF EXISTS `Report`;
CREATE TABLE `Report` (
  `report_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(11) DEFAULT NULL,
  `comment_id` int(11) DEFAULT NULL,
  `reported_user_id` bigint(11) DEFAULT NULL,
  `status` tinyint(2) DEFAULT NULL,
  PRIMARY KEY (`report_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `Report`
-- ----------------------------
BEGIN;
INSERT INTO `Report` VALUES ('1', '11', '1', '11', '1'), ('2', '9', '1', '11', '1'), ('3', '10', '10', '10', '1'), ('4', '10', '12', '10', '1');
COMMIT;

-- ----------------------------
--  Table structure for `ShopCar`
-- ----------------------------
DROP TABLE IF EXISTS `ShopCar`;
CREATE TABLE `ShopCar` (
  `shop_car_id` bigint(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(11) NOT NULL,
  `product_id` bigint(11) NOT NULL,
  `count` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL,
  `expire_time` datetime NOT NULL,
  `status` varchar(2) DEFAULT '',
  `location` varchar(500) DEFAULT NULL,
  PRIMARY KEY (`shop_car_id`),
  KEY `product_id` (`product_id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `ShopCar`
-- ----------------------------
BEGIN;
INSERT INTO `ShopCar` VALUES ('1', '9', '5', '3', '2019-01-10 21:24:07', '2019-01-17 21:24:07', 'U', '江西南昌东湖区东大街1号110'), ('3', '9', '10', '11', '2019-01-13 17:27:25', '2019-01-13 17:27:27', 'U', '江西南昌东湖区东大街1号110'), ('4', '9', '4', '1', '2019-01-13 18:07:18', '2019-01-20 18:07:18', 'U', '江西南昌东湖区东大街1号110'), ('5', '9', '2', '1', '2019-01-13 18:07:23', '2019-01-20 18:07:23', 'U', '江西南昌东湖区东大街1号110'), ('6', '9', '4', '10', '2019-01-15 22:33:20', '2019-01-22 22:33:20', 'U', '江西南昌东湖区东大街1号110'), ('7', '9', '4', '6', '2019-01-15 22:35:02', '2019-01-22 22:35:02', 'U', '江西南昌东湖区东大街1号110'), ('8', '9', '3', '9999', '2019-01-16 22:45:48', '2019-01-23 22:45:48', 'U', '江西南昌东湖区东大街1号110'), ('9', '9', '4', '1', '2019-01-17 21:39:18', '2019-01-24 21:39:18', 'U', '江西南昌东湖区东大街1号110'), ('10', '9', '2', '1', '2019-01-17 21:40:37', '2019-01-24 21:40:37', 'A', '江西南昌东湖区东大街1号110'), ('11', '9', '2', '1', '2019-01-17 21:41:18', '2019-01-24 21:41:18', 'U', '江西南昌东湖区东大街1号110'), ('12', '9', '2', '1', '2019-01-17 21:43:37', '2019-01-24 21:43:37', 'U', '江西南昌东湖区东大街1号110'), ('13', '9', '4', '1000', '2019-03-02 20:51:57', '2019-03-09 20:51:57', 'U', '江西南昌东湖区东大街1号110'), ('14', '9', '4', '1000', '2019-03-02 20:56:51', '2019-03-09 20:56:51', 'U', '江西南昌东湖区东大街1号110'), ('15', '9', '4', '1000', '2019-03-02 21:16:53', '2019-03-09 21:16:53', 'U', '江西南昌东湖区东大街1号110'), ('16', '9', '4', '1', '2019-03-12 21:45:26', '2019-03-19 21:45:26', 'A', '江西南昌东湖区东大街1号110'), ('17', '9', '4', '1', '2019-03-12 21:45:28', '2019-03-19 21:45:28', 'U', '江西南昌东湖区东大街1号110'), ('18', '11', '4', '1', '2019-03-16 20:32:08', '2019-03-23 20:32:08', 'U', '江西南昌东湖区东大街1号110'), ('19', '10', '4', '1', '2019-03-17 18:16:10', '2019-03-24 18:16:10', 'U', '江西南昌东湖区东大街1号110'), ('20', '10', '120', '1', '2019-03-17 18:53:23', '2019-03-24 18:53:23', 'A', '江西南昌东湖区东大街1号110'), ('21', '10', '120', '1', '2019-03-17 18:53:25', '2019-03-24 18:53:25', 'U', '江西南昌东湖区东大街1号110'), ('22', '12', '4', '1', '2019-03-20 15:31:31', '2019-03-27 15:31:31', 'U', '江西南昌东湖区东大街1号110');
COMMIT;

-- ----------------------------
--  Table structure for `User`
-- ----------------------------
DROP TABLE IF EXISTS `User`;
CREATE TABLE `User` (
  `user_id` bigint(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(500) NOT NULL,
  `password` varchar(500) NOT NULL,
  `salt` varchar(200) NOT NULL,
  `nickname` varchar(500) DEFAULT NULL,
  `gender` enum('M','F') DEFAULT NULL,
  `avatar` varchar(500) DEFAULT NULL,
  `reg_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `token` varchar(500) DEFAULT NULL,
  `age` int(11) DEFAULT NULL,
  `authority` int(11) DEFAULT NULL,
  `fuzhi` int(11) DEFAULT NULL,
  `status` tinyint(2) DEFAULT NULL,
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `username` (`username`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `User`
-- ----------------------------
BEGIN;
INSERT INTO `User` VALUES ('1', '1', 'd7bad57a5e1d3c5aa5d65a1c1bfba9e9', '_2gS', '11111', 'M', '1', '2018-12-27 22:01:58', '2019-03-11 20:36:16', '1', '2', '1', '1', '1'), ('9', 'admin@163.com', 'd1caf7a60113a86d270d6b8145c2ef58', '?ViY', 'ben', 'M', null, '2018-12-31 13:43:21', '2019-03-16 19:31:52', null, '20', '3', '1', '0'), ('10', '12@sina.com', 'd1caf7a60113a86d270d6b8145c2ef58', '?ViY', '12', 'M', null, '2019-03-11 20:27:28', '2019-03-17 20:04:07', null, '20', '1', '1', '1'), ('11', '12134287987@qq.com', 'd1caf7a60113a86d270d6b8145c2ef58', '?ViY', '11111', 'M', null, '2019-03-11 20:36:02', '2019-03-11 20:36:02', null, '12', '2', '1', '0'), ('12', '13154378976@163.com', 'd1caf7a60113a86d270d6b8145c2ef58', '?ViY', '213', 'M', null, '2019-03-17 21:18:08', '2019-03-20 15:33:43', null, '25', '1', '1', '0'), ('15', 'mjackycat@126.com', 'd1caf7a60113a86d270d6b8145c2ef58', '?ViY', '12', 'M', null, '2019-03-18 20:54:30', '2019-03-18 20:54:30', null, '12', '1', '1', '0');
COMMIT;

-- ----------------------------
--  Table structure for `UserToken`
-- ----------------------------
DROP TABLE IF EXISTS `UserToken`;
CREATE TABLE `UserToken` (
  `token_id` bigint(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(11) DEFAULT NULL,
  `token` varchar(500) DEFAULT NULL,
  PRIMARY KEY (`token_id`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `fk_user_token_user` FOREIGN KEY (`user_id`) REFERENCES `User` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `UserToken`
-- ----------------------------
BEGIN;
INSERT INTO `UserToken` VALUES ('1', '1', '1111'), ('2', '9', '005d80ef7cfee138148b7143513b606a'), ('3', '9', '52169f7494c11f0af4c3a52948c55376'), ('4', '9', '91219979709c9bf9c44d18fafac0cbc4'), ('5', '9', '1592b0560a4b714e3bd821e66a8ea482'), ('6', '9', 'ff7f593b8cdb40851e9cc02dc214b8f9'), ('7', '1', 'c17e12334d26ad6b857900846a28bc94'), ('8', null, '506aefdc81bca98fc325bf205b323a7b'), ('9', '1', '81b4e89bc271de44eb676a9b81bc4abc');
COMMIT;

-- ----------------------------
--  View structure for `v1`
-- ----------------------------
DROP VIEW IF EXISTS `v1`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `user`.`user_id` AS `user_id`,`user`.`username` AS `username`,`user`.`password` AS `password`,`user`.`salt` AS `salt`,`user`.`nickname` AS `nickname`,`user`.`gender` AS `gender`,`user`.`avatar` AS `avatar`,`user`.`reg_time` AS `reg_time`,`user`.`update_time` AS `update_time`,`user`.`token` AS `token`,`user`.`age` AS `age` from `user`;

SET FOREIGN_KEY_CHECKS = 1;
